package com.gm.commonlib.network;


public enum ResultCode {
    UNKOWN_ERROR(-1, "服务器未知异常或网络异常"),
    NETWORK_UNAVALIABLE_9(9, "服务器未知异常或网络异常"),
    NETWORK_UNAVALIABLE_1009(1009, "服务器未知异常或网络异常"),
    NO_CONTENT(204, "暂无内容"),
    DATE_WITHOUT_CHANGE(302, "数据没有修改"),
    PARAM_ERROR(400, "参数错误"),
    WITHOUT_PREMISSION(401, "没有权限"),
    WITHOUT_TUOTA(402, "无Quota"),
    PREMISSION_ERROR(403, "权限校验错误"),
    RESOURCE_ERROR(404, "请求的服务或页面不存在或已经下线"),
    OPERATION_ERROR(405, "不允许的操作（指定了错误的 HTTP方法或 API）"),
    REQUEST_LOST(406, "请求被丢弃"),
    TIME_OUT(408, "已过期"),
    REPEATE_OPERATE(409, "重复操作"),
    HEAD_ERROR_412(412, "Header错误"),
    SERVER_INNER_ERROR(500, "服务器内部错误");

    private final int id;
    private final String string;

    ResultCode(int id, String value) {
        this.id = id;
        this.string = value;
    }

    public int getId() {
        return id;
    }

    public String getValue() {
        return string;
    }

}
